# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import trading_pb2 as proto_dot_api_dot_trading__pb2
from .. import governance_pb2 as proto_dot_governance__pb2
from .. import vega_pb2 as proto_dot_vega__pb2


class tradingStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.PrepareSubmitOrder = channel.unary_unary(
        '/api.trading/PrepareSubmitOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.SubmitOrderRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PrepareSubmitOrderResponse.FromString,
        )
    self.PrepareCancelOrder = channel.unary_unary(
        '/api.trading/PrepareCancelOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.CancelOrderRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PrepareCancelOrderResponse.FromString,
        )
    self.PrepareAmendOrder = channel.unary_unary(
        '/api.trading/PrepareAmendOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.AmendOrderRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PrepareAmendOrderResponse.FromString,
        )
    self.SubmitOrder = channel.unary_unary(
        '/api.trading/SubmitOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.SubmitOrderRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.PendingOrder.FromString,
        )
    self.CancelOrder = channel.unary_unary(
        '/api.trading/CancelOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.CancelOrderRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.PendingOrder.FromString,
        )
    self.AmendOrder = channel.unary_unary(
        '/api.trading/AmendOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.AmendOrderRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.PendingOrder.FromString,
        )
    self.SignIn = channel.unary_unary(
        '/api.trading/SignIn',
        request_serializer=proto_dot_api_dot_trading__pb2.SignInRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.SignInResponse.FromString,
        )
    self.NotifyTraderAccount = channel.unary_unary(
        '/api.trading/NotifyTraderAccount',
        request_serializer=proto_dot_api_dot_trading__pb2.NotifyTraderAccountRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.NotifyTraderAccountResponse.FromString,
        )
    self.Withdraw = channel.unary_unary(
        '/api.trading/Withdraw',
        request_serializer=proto_dot_api_dot_trading__pb2.WithdrawRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.WithdrawResponse.FromString,
        )
    self.CheckToken = channel.unary_unary(
        '/api.trading/CheckToken',
        request_serializer=proto_dot_api_dot_trading__pb2.CheckTokenRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.CheckTokenResponse.FromString,
        )
    self.SubmitTransaction = channel.unary_unary(
        '/api.trading/SubmitTransaction',
        request_serializer=proto_dot_api_dot_trading__pb2.SubmitTransactionRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.SubmitTransactionResponse.FromString,
        )
    self.PrepareProposal = channel.unary_unary(
        '/api.trading/PrepareProposal',
        request_serializer=proto_dot_api_dot_trading__pb2.PrepareProposalRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PrepareProposalResponse.FromString,
        )
    self.PrepareVote = channel.unary_unary(
        '/api.trading/PrepareVote',
        request_serializer=proto_dot_api_dot_trading__pb2.PrepareVoteRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PrepareVoteResponse.FromString,
        )


class tradingServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def PrepareSubmitOrder(self, request, context):
    """Prepare a submit order request
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PrepareCancelOrder(self, request, context):
    """Cancel an Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PrepareAmendOrder(self, request, context):
    """Amend an Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SubmitOrder(self, request, context):
    """Submit an Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CancelOrder(self, request, context):
    """Cancel an Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AmendOrder(self, request, context):
    """Amend an Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SignIn(self, request, context):
    """Sign In
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def NotifyTraderAccount(self, request, context):
    """Request balance increase
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Withdraw(self, request, context):
    """Request withdrawal
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CheckToken(self, request, context):
    """Check an API token
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SubmitTransaction(self, request, context):
    """Submit a signed transaction
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PrepareProposal(self, request, context):
    """Governance

    Prepare proposal that can be sent out to the chain (via SubmitTransaction)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PrepareVote(self, request, context):
    """Prepare a vote to be put on the chain (via SubmitTransaction)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_tradingServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'PrepareSubmitOrder': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareSubmitOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.SubmitOrderRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PrepareSubmitOrderResponse.SerializeToString,
      ),
      'PrepareCancelOrder': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareCancelOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.CancelOrderRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PrepareCancelOrderResponse.SerializeToString,
      ),
      'PrepareAmendOrder': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareAmendOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.AmendOrderRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PrepareAmendOrderResponse.SerializeToString,
      ),
      'SubmitOrder': grpc.unary_unary_rpc_method_handler(
          servicer.SubmitOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.SubmitOrderRequest.FromString,
          response_serializer=proto_dot_vega__pb2.PendingOrder.SerializeToString,
      ),
      'CancelOrder': grpc.unary_unary_rpc_method_handler(
          servicer.CancelOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.CancelOrderRequest.FromString,
          response_serializer=proto_dot_vega__pb2.PendingOrder.SerializeToString,
      ),
      'AmendOrder': grpc.unary_unary_rpc_method_handler(
          servicer.AmendOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.AmendOrderRequest.FromString,
          response_serializer=proto_dot_vega__pb2.PendingOrder.SerializeToString,
      ),
      'SignIn': grpc.unary_unary_rpc_method_handler(
          servicer.SignIn,
          request_deserializer=proto_dot_api_dot_trading__pb2.SignInRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.SignInResponse.SerializeToString,
      ),
      'NotifyTraderAccount': grpc.unary_unary_rpc_method_handler(
          servicer.NotifyTraderAccount,
          request_deserializer=proto_dot_api_dot_trading__pb2.NotifyTraderAccountRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.NotifyTraderAccountResponse.SerializeToString,
      ),
      'Withdraw': grpc.unary_unary_rpc_method_handler(
          servicer.Withdraw,
          request_deserializer=proto_dot_api_dot_trading__pb2.WithdrawRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.WithdrawResponse.SerializeToString,
      ),
      'CheckToken': grpc.unary_unary_rpc_method_handler(
          servicer.CheckToken,
          request_deserializer=proto_dot_api_dot_trading__pb2.CheckTokenRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.CheckTokenResponse.SerializeToString,
      ),
      'SubmitTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.SubmitTransaction,
          request_deserializer=proto_dot_api_dot_trading__pb2.SubmitTransactionRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.SubmitTransactionResponse.SerializeToString,
      ),
      'PrepareProposal': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareProposal,
          request_deserializer=proto_dot_api_dot_trading__pb2.PrepareProposalRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PrepareProposalResponse.SerializeToString,
      ),
      'PrepareVote': grpc.unary_unary_rpc_method_handler(
          servicer.PrepareVote,
          request_deserializer=proto_dot_api_dot_trading__pb2.PrepareVoteRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PrepareVoteResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'api.trading', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))


class trading_dataStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.MarketAccounts = channel.unary_unary(
        '/api.trading_data/MarketAccounts',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketAccountsRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketAccountsResponse.FromString,
        )
    self.PartyAccounts = channel.unary_unary(
        '/api.trading_data/PartyAccounts',
        request_serializer=proto_dot_api_dot_trading__pb2.PartyAccountsRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PartyAccountsResponse.FromString,
        )
    self.Candles = channel.unary_unary(
        '/api.trading_data/Candles',
        request_serializer=proto_dot_api_dot_trading__pb2.CandlesRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.CandlesResponse.FromString,
        )
    self.MarketDataByID = channel.unary_unary(
        '/api.trading_data/MarketDataByID',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketDataByIDRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketDataByIDResponse.FromString,
        )
    self.MarketsData = channel.unary_unary(
        '/api.trading_data/MarketsData',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketsDataResponse.FromString,
        )
    self.MarketByID = channel.unary_unary(
        '/api.trading_data/MarketByID',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketByIDRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketByIDResponse.FromString,
        )
    self.MarketDepth = channel.unary_unary(
        '/api.trading_data/MarketDepth',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketDepthRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketDepthResponse.FromString,
        )
    self.Markets = channel.unary_unary(
        '/api.trading_data/Markets',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarketsResponse.FromString,
        )
    self.OrderByMarketAndID = channel.unary_unary(
        '/api.trading_data/OrderByMarketAndID',
        request_serializer=proto_dot_api_dot_trading__pb2.OrderByMarketAndIdRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.OrderByMarketAndIdResponse.FromString,
        )
    self.OrderByReference = channel.unary_unary(
        '/api.trading_data/OrderByReference',
        request_serializer=proto_dot_api_dot_trading__pb2.OrderByReferenceRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.OrderByReferenceResponse.FromString,
        )
    self.OrdersByMarket = channel.unary_unary(
        '/api.trading_data/OrdersByMarket',
        request_serializer=proto_dot_api_dot_trading__pb2.OrdersByMarketRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.OrdersByMarketResponse.FromString,
        )
    self.OrdersByParty = channel.unary_unary(
        '/api.trading_data/OrdersByParty',
        request_serializer=proto_dot_api_dot_trading__pb2.OrdersByPartyRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.OrdersByPartyResponse.FromString,
        )
    self.OrderByID = channel.unary_unary(
        '/api.trading_data/OrderByID',
        request_serializer=proto_dot_api_dot_trading__pb2.OrderByIDRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Order.FromString,
        )
    self.OrderByReferenceID = channel.unary_unary(
        '/api.trading_data/OrderByReferenceID',
        request_serializer=proto_dot_api_dot_trading__pb2.OrderByReferenceIDRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Order.FromString,
        )
    self.MarginLevels = channel.unary_unary(
        '/api.trading_data/MarginLevels',
        request_serializer=proto_dot_api_dot_trading__pb2.MarginLevelsRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.MarginLevelsResponse.FromString,
        )
    self.Parties = channel.unary_unary(
        '/api.trading_data/Parties',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PartiesResponse.FromString,
        )
    self.PartyByID = channel.unary_unary(
        '/api.trading_data/PartyByID',
        request_serializer=proto_dot_api_dot_trading__pb2.PartyByIDRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PartyByIDResponse.FromString,
        )
    self.PositionsByParty = channel.unary_unary(
        '/api.trading_data/PositionsByParty',
        request_serializer=proto_dot_api_dot_trading__pb2.PositionsByPartyRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.PositionsByPartyResponse.FromString,
        )
    self.LastTrade = channel.unary_unary(
        '/api.trading_data/LastTrade',
        request_serializer=proto_dot_api_dot_trading__pb2.LastTradeRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.LastTradeResponse.FromString,
        )
    self.TradesByMarket = channel.unary_unary(
        '/api.trading_data/TradesByMarket',
        request_serializer=proto_dot_api_dot_trading__pb2.TradesByMarketRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.TradesByMarketResponse.FromString,
        )
    self.TradesByOrder = channel.unary_unary(
        '/api.trading_data/TradesByOrder',
        request_serializer=proto_dot_api_dot_trading__pb2.TradesByOrderRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.TradesByOrderResponse.FromString,
        )
    self.TradesByParty = channel.unary_unary(
        '/api.trading_data/TradesByParty',
        request_serializer=proto_dot_api_dot_trading__pb2.TradesByPartyRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.TradesByPartyResponse.FromString,
        )
    self.GetProposals = channel.unary_unary(
        '/api.trading_data/GetProposals',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.GetProposalsResponse.FromString,
        )
    self.GetOpenProposals = channel.unary_unary(
        '/api.trading_data/GetOpenProposals',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.GetProposalsResponse.FromString,
        )
    self.GetProposalByID = channel.unary_unary(
        '/api.trading_data/GetProposalByID',
        request_serializer=proto_dot_api_dot_trading__pb2.GetProposalByIDRequest.SerializeToString,
        response_deserializer=proto_dot_governance__pb2.ProposalVote.FromString,
        )
    self.GetProposalByReference = channel.unary_unary(
        '/api.trading_data/GetProposalByReference',
        request_serializer=proto_dot_api_dot_trading__pb2.GetProposalByReferenceRequest.SerializeToString,
        response_deserializer=proto_dot_governance__pb2.ProposalVote.FromString,
        )
    self.ObserveProposals = channel.unary_stream(
        '/api.trading_data/ObserveProposals',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_governance__pb2.ProposalVote.FromString,
        )
    self.Statistics = channel.unary_unary(
        '/api.trading_data/Statistics',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Statistics.FromString,
        )
    self.GetVegaTime = channel.unary_unary(
        '/api.trading_data/GetVegaTime',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.VegaTimeResponse.FromString,
        )
    self.AccountsSubscribe = channel.unary_stream(
        '/api.trading_data/AccountsSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.AccountsSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Account.FromString,
        )
    self.CandlesSubscribe = channel.unary_stream(
        '/api.trading_data/CandlesSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.CandlesSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Candle.FromString,
        )
    self.MarginLevelsSubscribe = channel.unary_stream(
        '/api.trading_data/MarginLevelsSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.MarginLevelsSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.MarginLevels.FromString,
        )
    self.MarketDepthSubscribe = channel.unary_stream(
        '/api.trading_data/MarketDepthSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketDepthSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.MarketDepth.FromString,
        )
    self.MarketsDataSubscribe = channel.unary_stream(
        '/api.trading_data/MarketsDataSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.MarketsDataSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.MarketData.FromString,
        )
    self.OrdersSubscribe = channel.unary_stream(
        '/api.trading_data/OrdersSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.OrdersSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.OrdersStream.FromString,
        )
    self.PositionsSubscribe = channel.unary_stream(
        '/api.trading_data/PositionsSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.PositionsSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.Position.FromString,
        )
    self.TradesSubscribe = channel.unary_stream(
        '/api.trading_data/TradesSubscribe',
        request_serializer=proto_dot_api_dot_trading__pb2.TradesSubscribeRequest.SerializeToString,
        response_deserializer=proto_dot_api_dot_trading__pb2.TradesStream.FromString,
        )
    self.TransferResponsesSubscribe = channel.unary_stream(
        '/api.trading_data/TransferResponsesSubscribe',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=proto_dot_vega__pb2.TransferResponse.FromString,
        )


class trading_dataServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def MarketAccounts(self, request, context):
    """Accounts

    Get a list of Accounts by Market
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PartyAccounts(self, request, context):
    """Get a list of Accounts by Party
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Candles(self, request, context):
    """Candles

    Get a list of Candles by Market
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketDataByID(self, request, context):
    """Market Data

    Get Market Data by MarketID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketsData(self, request, context):
    """Get a list of Market Data
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketByID(self, request, context):
    """Markets

    Get a Market by ID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketDepth(self, request, context):
    """Get Market Depth
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Markets(self, request, context):
    """Get a list of Markets
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrderByMarketAndID(self, request, context):
    """Orders

    Get an Order by Market and OrderID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrderByReference(self, request, context):
    """Get an Order by Pending Order reference (UUID)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrdersByMarket(self, request, context):
    """Get a list of Orders by Market
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrdersByParty(self, request, context):
    """Get a list of Orders by Party
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrderByID(self, request, context):
    """Get a specific order by orderID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrderByReferenceID(self, request, context):
    """Get a specific order by referenceID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarginLevels(self, request, context):
    """Parties

    Get Margin Levels by PartyID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Parties(self, request, context):
    """Get a list of Parties
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PartyByID(self, request, context):
    """Get a Party by ID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PositionsByParty(self, request, context):
    """Positions

    Get a list of Positions by Party
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def LastTrade(self, request, context):
    """Trades

    Get latest Trade
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TradesByMarket(self, request, context):
    """Get a list of Trades by Market
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TradesByOrder(self, request, context):
    """Get a list of Trades by Order
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TradesByParty(self, request, context):
    """Get a list of Trades by Party
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetProposals(self, request, context):
    """Governance

    Get all proposals
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetOpenProposals(self, request, context):
    """Get all OPEN proposals
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetProposalByID(self, request, context):
    """Get a proposal by ID
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetProposalByReference(self, request, context):
    """Get a proposal by reference
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ObserveProposals(self, request, context):
    """Subscribe to a stream of updates to proposal data
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Statistics(self, request, context):
    """Misc

    Get Statistics
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetVegaTime(self, request, context):
    """Get Time
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AccountsSubscribe(self, request, context):
    """Subscribe to a stream of Accounts
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CandlesSubscribe(self, request, context):
    """Subscribe to a stream of Candles
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarginLevelsSubscribe(self, request, context):
    """Subscribe to a stream of Margin Levels
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketDepthSubscribe(self, request, context):
    """Subscribe to a stream of Market Depth
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def MarketsDataSubscribe(self, request, context):
    """Subscribe to a stream of Markets Data
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OrdersSubscribe(self, request, context):
    """Subscribe to a stream of Orders
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PositionsSubscribe(self, request, context):
    """Subscribe to a stream of Positions
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TradesSubscribe(self, request, context):
    """Subscribe to a stream of Trades
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TransferResponsesSubscribe(self, request, context):
    """Subscribe to a stream of Transfer Responses
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_trading_dataServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'MarketAccounts': grpc.unary_unary_rpc_method_handler(
          servicer.MarketAccounts,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketAccountsRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketAccountsResponse.SerializeToString,
      ),
      'PartyAccounts': grpc.unary_unary_rpc_method_handler(
          servicer.PartyAccounts,
          request_deserializer=proto_dot_api_dot_trading__pb2.PartyAccountsRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PartyAccountsResponse.SerializeToString,
      ),
      'Candles': grpc.unary_unary_rpc_method_handler(
          servicer.Candles,
          request_deserializer=proto_dot_api_dot_trading__pb2.CandlesRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.CandlesResponse.SerializeToString,
      ),
      'MarketDataByID': grpc.unary_unary_rpc_method_handler(
          servicer.MarketDataByID,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketDataByIDRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketDataByIDResponse.SerializeToString,
      ),
      'MarketsData': grpc.unary_unary_rpc_method_handler(
          servicer.MarketsData,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketsDataResponse.SerializeToString,
      ),
      'MarketByID': grpc.unary_unary_rpc_method_handler(
          servicer.MarketByID,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketByIDRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketByIDResponse.SerializeToString,
      ),
      'MarketDepth': grpc.unary_unary_rpc_method_handler(
          servicer.MarketDepth,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketDepthRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketDepthResponse.SerializeToString,
      ),
      'Markets': grpc.unary_unary_rpc_method_handler(
          servicer.Markets,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarketsResponse.SerializeToString,
      ),
      'OrderByMarketAndID': grpc.unary_unary_rpc_method_handler(
          servicer.OrderByMarketAndID,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrderByMarketAndIdRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.OrderByMarketAndIdResponse.SerializeToString,
      ),
      'OrderByReference': grpc.unary_unary_rpc_method_handler(
          servicer.OrderByReference,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrderByReferenceRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.OrderByReferenceResponse.SerializeToString,
      ),
      'OrdersByMarket': grpc.unary_unary_rpc_method_handler(
          servicer.OrdersByMarket,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrdersByMarketRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.OrdersByMarketResponse.SerializeToString,
      ),
      'OrdersByParty': grpc.unary_unary_rpc_method_handler(
          servicer.OrdersByParty,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrdersByPartyRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.OrdersByPartyResponse.SerializeToString,
      ),
      'OrderByID': grpc.unary_unary_rpc_method_handler(
          servicer.OrderByID,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrderByIDRequest.FromString,
          response_serializer=proto_dot_vega__pb2.Order.SerializeToString,
      ),
      'OrderByReferenceID': grpc.unary_unary_rpc_method_handler(
          servicer.OrderByReferenceID,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrderByReferenceIDRequest.FromString,
          response_serializer=proto_dot_vega__pb2.Order.SerializeToString,
      ),
      'MarginLevels': grpc.unary_unary_rpc_method_handler(
          servicer.MarginLevels,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarginLevelsRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.MarginLevelsResponse.SerializeToString,
      ),
      'Parties': grpc.unary_unary_rpc_method_handler(
          servicer.Parties,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PartiesResponse.SerializeToString,
      ),
      'PartyByID': grpc.unary_unary_rpc_method_handler(
          servicer.PartyByID,
          request_deserializer=proto_dot_api_dot_trading__pb2.PartyByIDRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PartyByIDResponse.SerializeToString,
      ),
      'PositionsByParty': grpc.unary_unary_rpc_method_handler(
          servicer.PositionsByParty,
          request_deserializer=proto_dot_api_dot_trading__pb2.PositionsByPartyRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.PositionsByPartyResponse.SerializeToString,
      ),
      'LastTrade': grpc.unary_unary_rpc_method_handler(
          servicer.LastTrade,
          request_deserializer=proto_dot_api_dot_trading__pb2.LastTradeRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.LastTradeResponse.SerializeToString,
      ),
      'TradesByMarket': grpc.unary_unary_rpc_method_handler(
          servicer.TradesByMarket,
          request_deserializer=proto_dot_api_dot_trading__pb2.TradesByMarketRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.TradesByMarketResponse.SerializeToString,
      ),
      'TradesByOrder': grpc.unary_unary_rpc_method_handler(
          servicer.TradesByOrder,
          request_deserializer=proto_dot_api_dot_trading__pb2.TradesByOrderRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.TradesByOrderResponse.SerializeToString,
      ),
      'TradesByParty': grpc.unary_unary_rpc_method_handler(
          servicer.TradesByParty,
          request_deserializer=proto_dot_api_dot_trading__pb2.TradesByPartyRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.TradesByPartyResponse.SerializeToString,
      ),
      'GetProposals': grpc.unary_unary_rpc_method_handler(
          servicer.GetProposals,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.GetProposalsResponse.SerializeToString,
      ),
      'GetOpenProposals': grpc.unary_unary_rpc_method_handler(
          servicer.GetOpenProposals,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.GetProposalsResponse.SerializeToString,
      ),
      'GetProposalByID': grpc.unary_unary_rpc_method_handler(
          servicer.GetProposalByID,
          request_deserializer=proto_dot_api_dot_trading__pb2.GetProposalByIDRequest.FromString,
          response_serializer=proto_dot_governance__pb2.ProposalVote.SerializeToString,
      ),
      'GetProposalByReference': grpc.unary_unary_rpc_method_handler(
          servicer.GetProposalByReference,
          request_deserializer=proto_dot_api_dot_trading__pb2.GetProposalByReferenceRequest.FromString,
          response_serializer=proto_dot_governance__pb2.ProposalVote.SerializeToString,
      ),
      'ObserveProposals': grpc.unary_stream_rpc_method_handler(
          servicer.ObserveProposals,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_governance__pb2.ProposalVote.SerializeToString,
      ),
      'Statistics': grpc.unary_unary_rpc_method_handler(
          servicer.Statistics,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_vega__pb2.Statistics.SerializeToString,
      ),
      'GetVegaTime': grpc.unary_unary_rpc_method_handler(
          servicer.GetVegaTime,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.VegaTimeResponse.SerializeToString,
      ),
      'AccountsSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.AccountsSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.AccountsSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.Account.SerializeToString,
      ),
      'CandlesSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.CandlesSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.CandlesSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.Candle.SerializeToString,
      ),
      'MarginLevelsSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.MarginLevelsSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarginLevelsSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.MarginLevels.SerializeToString,
      ),
      'MarketDepthSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.MarketDepthSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketDepthSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.MarketDepth.SerializeToString,
      ),
      'MarketsDataSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.MarketsDataSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.MarketsDataSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.MarketData.SerializeToString,
      ),
      'OrdersSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.OrdersSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.OrdersSubscribeRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.OrdersStream.SerializeToString,
      ),
      'PositionsSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.PositionsSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.PositionsSubscribeRequest.FromString,
          response_serializer=proto_dot_vega__pb2.Position.SerializeToString,
      ),
      'TradesSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.TradesSubscribe,
          request_deserializer=proto_dot_api_dot_trading__pb2.TradesSubscribeRequest.FromString,
          response_serializer=proto_dot_api_dot_trading__pb2.TradesStream.SerializeToString,
      ),
      'TransferResponsesSubscribe': grpc.unary_stream_rpc_method_handler(
          servicer.TransferResponsesSubscribe,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=proto_dot_vega__pb2.TransferResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'api.trading_data', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
